package com.tzu.ft.base;

import com.tzu.utils.JSONTools;

import java.io.Serializable;

/**
 * socket返回对象
 */
public class ResultParam implements Serializable {

	private static final long serialVersionUID = 1L;
	
    //返回状态码
    private String code;
    private long startLength;
    private String message;

    public ResultParam() {
    }

    public ResultParam(String code) {
        this(code, 0, "");
    }

    public ResultParam(String code, long startLength) {
        this(code, startLength, "");
    }

    public ResultParam(String code, String message) {
        this(code, 0, message);
    }

    public ResultParam(String code, long startLength, String message) {
        this.startLength = startLength;
        this.message = message;
        this.code = code;
    }


    public String toJSON() {
        return JSONTools.toJSONString(this);
    }


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public long getStartLength() {
        return startLength;
    }

    public void setStartLength(long startLength) {
        this.startLength = startLength;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}


